using UnityEngine;

namespace Crosstales.OnlineCheck.Tool
{
    // [Assembly-CSharp-firstpass.dll].Crosstales.OnlineCheck.Tool.Proxy
    public class Proxy : MonoBehaviour
    {
        // Fields
        public string HTTPProxyURL;
        public int HTTPProxyPort;
        public string HTTPProxyUsername;
        public string HTTPProxyPassword;
        public string HTTPProxyURLProtocol;
        public string HTTPSProxyURL;
        public int HTTPSProxyPort;
        public string HTTPSProxyUsername;
        public string HTTPSProxyPassword;
        public string HTTPSProxyURLProtocol;
        public bool EnableOnAwake;
        private const string HTTPProxyEnvVar = "HTTP_PROXY";
        private const string HTTPSProxyEnvVar = "HTTPS_PROXY";
        private static bool _hasHTTPProxy_k__BackingField;
        private static bool _hasHTTPSProxy_k__BackingField;
        
        // Properties
        public static bool hasHTTPProxy { get; set; }
        public static bool hasHTTPSProxy { get; set; }
        
        // Methods
        private static Proxy()
        {
            var val_1 = 536891057;
            if(mem[536891281] == 0)
            {
                    val_1 = 536891057;
            }
            
            mem2[0] = 0;
            val_1 = 536891057;
            if(mem[536891281] == 0)
            {
                    val_1 = 536891057;
            }
            
            mem2[0] = 0;
        }
        public static bool get_hasHTTPProxy()
        {
            if(mem[536891281] != 0)
            {
                    return (bool)mem[536891241];
            }
            
            536891057 = 536891057;
            return (bool)mem[536891241];
        }
        private static void set_hasHTTPProxy(bool value)
        {
            if(mem[536891281] == 0)
            {
                    536891057 = 536891057;
            }
            
            mem2[0] = value;
        }
        public static bool get_hasHTTPSProxy()
        {
            if(mem[536891281] != 0)
            {
                    return (bool)mem[536891241] + 1;
            }
            
            536891057 = 536891057;
            return (bool)mem[536891241] + 1;
        }
        private static void set_hasHTTPSProxy(bool value)
        {
            if(mem[536891281] == 0)
            {
                    536891057 = 536891057;
            }
            
            mem2[0] = value;
        }
        private void Awake()
        {
            if(this.EnableOnAwake == false)
            {
                    return;
            }
            
            this.EnableHTTPProxy();
            this.EnableHTTPSProxy();
        }
        private void Update()
        {
            bool val_1 = Crosstales.Common.Util.BaseHelper.isEditorMode;
        }
        public void EnableHTTPProxy()
        {
            Crosstales.OnlineCheck.Tool.Proxy.EnableHTTPProxy(url:  536891057, port:  0, username:  null, password:  null, urlProtocol:  null);
        }
        public void EnableHTTPSProxy()
        {
            Crosstales.OnlineCheck.Tool.Proxy.EnableHTTPSProxy(url:  536891057, port:  0, username:  null, password:  null, urlProtocol:  null);
        }
        public static void EnableHTTPProxy(string url, int port, string username = "", string password = "", string urlProtocol = "")
        {
            bool val_1 = Crosstales.Common.Util.BaseHelper.isEditor;
            bool val_2 = Crosstales.Common.Util.BaseHelper.isStandalonePlatform;
            UnityEngine.Debug.LogWarning(message:  -1610611969);
        }
        public static void EnableHTTPSProxy(string url, int port, string username = "", string password = "", string urlProtocol = "")
        {
            bool val_1 = Crosstales.Common.Util.BaseHelper.isEditor;
            bool val_2 = Crosstales.Common.Util.BaseHelper.isStandalonePlatform;
            UnityEngine.Debug.LogWarning(message:  -1610611969);
        }
        public static void DisableHTTPProxy()
        {
            bool val_1 = Crosstales.Common.Util.BaseHelper.isEditor;
            bool val_2 = Crosstales.Common.Util.BaseHelper.isStandalonePlatform;
            UnityEngine.Debug.LogWarning(message:  -1610611969);
        }
        public static void DisableHTTPSProxy()
        {
            bool val_1 = Crosstales.Common.Util.BaseHelper.isEditor;
            bool val_2 = Crosstales.Common.Util.BaseHelper.isStandalonePlatform;
            UnityEngine.Debug.LogWarning(message:  -1610611969);
        }
        private static bool validPort(int port)
        {
            return (bool)(port < 65536) ? 1 : 0;
        }
        public Proxy()
        {
            this.HTTPProxyPort = 8080;
            this.HTTPProxyUsername = mem[536893213];
            this.HTTPProxyPassword = mem[536893213];
            this.HTTPProxyURLProtocol = mem[536893213];
            this.HTTPSProxyPort = 8443;
            this.HTTPSProxyUsername = mem[536893213];
            this.HTTPSProxyPassword = mem[536893213];
            this.HTTPSProxyURLProtocol = mem[536893213];
        }
    
    }

}
